package cz.cuni.mff.ufal.volk.il;

/**
 * A common interpreter of commands in the intermediate language. It receives commands
 * from the third layer and passes them to the physical layer and/or sends to the user some
 * messages or questions (e.g. if the user command to interpret cannot be understood).
 *
 * <p>An interpreter can use the context. It can read it and write to it as well.</p>
 *
 * @author Bartłomiej Etenkowski
 */
public interface Interpreter {

  /**
   * Tries to interpret the specified expression in the intermediate language. Then it usually
   * sends either commands to the controlled device or messages or questions to the user (back
   * to the third layer through the associated {@link EventProcessor}).
   *
   * <p>The method can read and modify the context.</p>
   *
   * @param ile the expression to interpret
   */
  void interpret(Node ile);

}
